<template>
  <div id="app">
    <router-link name="foo" to="/">foo</router-link>
    <router-link name="bar" to="/bar">bar</router-link>
    <router-view></router-view>
    {{ $store.state.name }}
    <!-- <button @click="$store.dispatch('changeName')">改变名字</button> -->
    <!-- <Bar></Bar>
    <Foo></Foo> -->
  </div>
</template>

<script>
import Bar from "./components/Bar.vue";
import Foo from "./components/Foo.vue";
export default {
  components: {
    Bar,
    Foo,
  },
};
</script>

<style></style>
